function createArray(...elements){
  let handler={
    get(target,propKey,receiver){
      let index=Number(propKey);
      if(index<0){
        propKey = String(target.length+index);
      }
      return Reflect.get(target,propKey,receiver);
    }
  };
  let target=[];
  target.push(...elements);
  return new Proxy(target,handler);
}

let arr=createArray('a','b','c')
console.log(arr[-1])